package de.dhbw.minf12.mas;

import static org.junit.Assert.*;

import java.util.List;

import org.junit.Test;

public class PermutationTester {

	@Test
	public void testPermutation() {
		int sizeOfPermutation = 5;
		Permutation contract = new Permutation(sizeOfPermutation);
		contract.sortRandomly();
		assertEquals(sizeOfPermutation, contract.size());
		
		List<Permutation> neighbors = contract.getNeighbors(5);
		assertEquals(5, neighbors.size());
		
		neighbors = contract.getNeighbors(10);
		assertEquals(10, neighbors.size());
		
		//es gibt max. 10 mögliche Nachbarn bei Perm-Size 5
		neighbors = contract.getNeighbors(11);
		assertEquals(10, neighbors.size());
	}

}
